<?php include '../public/header.php' ?>
<?php include '../public/header_index.php' ?>
<?php include "../public/header_edit.php"?>
<script src="/static/admin/js/math.js"></script>
<link rel="stylesheet" type="text/css" href="/static/admin/css/main.css">
<body class="laytp-container">
<div style="height: 45px"></div>
<div id="opt_nav">
</div>
<div id="dialog">
    <div class="page-title" id="page-title">
        <div class="page-title-con">
            <span class="title" id="titss"></span>
            <div class="move_title"></div>
            <div class="page-title-opt-list">
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
</div>
<?php include "dao.php"?>


<div class="layui-card" id="table-card">
    <div class="layui-card-body">
        <div class="layui-row">
            <div class="layui-col-md12" id="table_list">
                <div class="layui-card-body">
                    <table id="datalist" lay-filter="datalist"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="toolbarDemo">
    <div class = "layui-btn-container">
        <button class="layui-btn layui-btn-primary outbut" onclick="auth_but_func_edit()">编辑</button>
        <div class="biantit" style="color: #248bfe;font-size: 13px;float: right;margin-right: 50px"></div>
    </div>
</script>
<script>




    layui.use(["laytp",'laypage','table','dropdown','form','soulTable'], function () {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable;

        $('#TableSearchReset').click(function () {
            $('.xmselect_div>xm-select').find('.xm-label-block').css('display','none');
            $('.xmselect_div').append('<div class="xmselect_title">请选择</div>');
            searchTableFunc(form, table)
        });

        setSouTableExport('总价汇总表');
        var mytable = table.render({
            elem: "#datalist",id: "datalist"
            ,url: facade.url(ask_main_huishu_list),where: {enginid:param_enginid}, page: true, height: 'full-120'
            ,soulSort: TabInit.soulSort,method: TabInit.method, toolbar: TabInit.toolbar, overflow: TabInit.overflow
            ,defaultToolbar: TabInit.defaultToolbar,filter: TabInit.filter
            ,request: TabInit.request,response: TabInit.response,contextmenu:get_table_contextmenu(soulTable)
            ,text: TabInit.text,totalRow: true
            ,parseData: function (res) {
                $(".biantit").html(res.data.tit);
                render_from();
                return {
                    "code": res.code,
                    "msg": res.message,
                    "count": res.data.total,
                    "data": res.data.data
                };
            }
            , cols: [[
                {type:'numbers',title:''}
                ,{field:'xuhao',title:'序号',width:80}
                ,{field:'name',title:'单位工程名称'}
                ,{field:'info',title:'内容'}
                ,{field:'toufee',title:'投标报价'}
                ,{field:'yufee',title:'预算价'}
                ,{field:'chanfee',title:'成本价'}
                ,{field:'gerate',title:'各单位工程占比（成本价）'}
                ,{field:'jianarea',title:'建筑面积'}
                ,{field:'toudan',title:'投标价单方造价'}
                ,{field:'yudan',title:'预算价单方造价'}
                ,{field:'chandan',title:'成本单方造价'}
                ,{field:'explain',title:'备注'}
            ]]
            , done: function (res) {
                soulTable.render(this);
            }
        });

        listTableSearch(form, table);
    });




    function auth_but_func_edit() {
        openPageEdit('huishu_edit.php?close=1&enginid='+param_enginid, '90%', '90%');
    }
</script>
</body>
</html>
